package com.ftw.commons.flurry

import com.flurry.android.FlurryAgent
import com.ftw.commons.BuildConfig


object FlurryUtils {


    //========= 导入私钥
    //点击导入私钥登录邮箱
    val CLICK_LOGIN_MAILBOX: String = "CLICK_LOGIN_MAILBOX"
    //用私钥登录
    val CLICK_IMPORT_PRIVATE_KEY_LOGIN: String = "CLICK_IMPORT_PRIVATE_KEY_LOGIN"
    //用助记词登录
    val CLICK_IMPORT_MNEMONIC_LOGIN: String = "CLICK_IMPORT_MNEMONIC_LOGIN"


    //========= 注册幂度邮箱
    //点击注册密度邮箱 register
    val CLICK_REGISTER_MAILBOX: String = "CLICK_REGISTER_MAILBOX"
    //点击注册幂度邮箱注册按钮,开始注册了
    val CLICK_START_REGISTER: String = "CLICK_START_REGISTER"
    //注册邮箱点击返回了按钮，取消邮箱注册
    val CANCEL_REGISTER: String = "CANCEL_REGISTER"


    //========= 备份注册词
    //点击下一步
    val BACK_UP_MNEMNIC_NEXT: String = "BACK_UP_MNEMNIC_NEXT"
    //点击跳过
    val BACK_UP_MNEMNIC_SKIP: String = "BACK_UP_MNEMNIC_SKIP"
    //点击回退按钮取消助记词备份
    val CANCLE_BACK_UP_MNEMNIC: String = "CANCLE_BACK_UP_MNEMNIC"
    //点击确认助记词完成
    val BACK_UP_MNEMNIC_COMPLETE: String = "BACK_UP_MNEMNIC_COMPLETE"
    //点击确认助记词回退按钮(用户嫌弃重新验证助记词麻烦时候就会回退到上一个页面)
    val CANCEL_BACK_UP_COMPLETE_MNEMNIC: String = "CANCEL_BACK_UP_COMPLETE_MNEMNIC"
    //点击设置本地密码按钮
    val BACK_UP_COMPLETE_MNEMNIC_SETTING_LOCAL_PWD: String =
        "BACK_UP_COMPLETE_MNEMNIC_SETTING_LOCAL_PWD"
    //点击设置本地密码回退按钮，取消本地密码设置
    val BACK_UP_COMPLETE_MNEMNIC_CANCLE_SETTING_LOCAL_PWD: String =
        "BACK_UP_COMPLETE_MNEMNIC_CANCLE_SETTING_LOCAL_PWD"

    //=========  首页
    //点击同意协议弹窗的关闭按钮
    val CLICK_CLOSE_AGREEMENT = "CLICK_CLOSE_AGREEMENT"
    //点击抽屉打开窗口
    val CLICK_DRAWER = "CLICK_DRAWER"
    //点击搜索
    val CLICK_SEARCH = "CLICK_SEARCH"
    //点击写邮件
    val CLICK_WRITE_MAIL = "CLICK_WRITE_MAIL"

    //=========  抽屉
    //点击收件箱inbox
    val CLICK_INBOX = "CLICK_INBOX"

    //点击存证邮件 deposit_certificate
    val CLICK_DEPOSIT_CERTIFIACTE = "CLICK_DEPOSIT_CERTIFIACTE"

    //点击已发送
    val CLICK_HAS_SEND = "CLICK_HAS_SEND"
    //点击草稿箱
    val CLICK_DRAFT_BOX = "CLICK_DRAFT_BOX"
    //点击已删除
    val CLICK_DELETED = "CLICK_DELETED"
    //点击重要邮件
    val CLICK_IMPORTANT_MAIL = "CLICK_IMPORTANT_MAIL"
    //点击账号切换
    val CLICK_SWITCH_ACCOUNT = "CLICK_SWITCH_ACCOUNT"
    //点击切换账号触发的密码检查并完成
    val COMPLETE_SWITCH_ACCOUNT_SETTING_CHECK_PWD_COMPLETE =
        "COMPLETE_SWITCH_ACCOUNT_SETTING_CHECK_PWD_COMPLETE"
    //放弃切换账号触发的密码检查
    val CANCEL_SWITCH_ACCOUNT_SETTING_CHECK_PWD = "CANCEL_SWITCH_ACCOUNT_SETTING_CHECK_PWD"
    //点击切换账号触发密码设置按完成
    val CLICK_SWITCH_ACCOUNT_SETTING_LOCAL_PWD_COMPLETE =
        "CLICK_SWITCH_ACCOUNT_SETTING_LOCAL_PWD_COMPLETE"
    //点击切换账号触发密码设置按取消
    val CANCEL_SWITCH_ACCOUNT_SETTING_LOCAL_PWD = "CANCEL_SWITCH_ACCOUNT_SETTING_LOCAL_PWD"
    //=========  搜索
    //点击取消搜索
    val CANCEL_SEARCH = "CANCEL_SEARCH"
    //点击删除搜索历史
    val CANCEL_DELETE_SEARCH_HISTORY = "CANCEL_DELETE_SEARCH_HISTORY"
    //从搜索列表点击进入邮件详情
    val CLICK_SEARCH_INTO_EMAIL_DETAIL = "CLICK_SEARCH_INTO_EMAIL_DETAIL"
    //点击搜索下的收件箱
    val CLICK_SEARCH_RECEIVE_BOX = "CLICK_SEARCH_RECEIVE_BOX"
    //点击搜索下的已发送
    val CLICK_SEARCH_HAS_SEND_BOX = "CLICK_SEARCH_HAS_SEND_BOX"


    //=========  写邮件
    //选择在文本中上传图片的，实际上是选择了内容中包裹图片的
    val SELECT_CONTENT_IMG = "SELECT_CONTENT_IMG"
    //选择上传附件的
    val SELECT_ATTACH_MENT_UPLOAD = "SELECT_ATTACH_MENT_UPLOAD"
    //选择定时发送，并确认定时发送的
    val SELECT_SCHEDULED_TRANSMISSION_COMPLETE = "SELECT_SCHEDULED_TRANSMISSION_COMPLETE"
    //取消定时发送
    val CANCLE_SCHEDULED_TRANSMISSION_COMPLETE = "CANCLE_SCHEDULED_TRANSMISSION_COMPLETE"
    //退出编辑保存草稿的
    val EXIT_WRITE_SAVE_DRAFT = "EXIT_WRITE_SAVE_DRAFT"
    //退出编辑取不报存草稿的
    val EXIT_WRITE_DONT_SAVE_DRAFT = "EXIT_WRITE_DONT_SAVE_DRAFT"
    //邮件发送带附件的
    val SEND_MAIL_CONTAIN_ATTACHMENT = "SEND_MAIL_CONTAIN_ATTACHMENT"
    //邮件发送不带附件的
    val SEND_MAIL_DONT_CONTAIN_ATTACHMENT = "SEND_MAIL_DONT_CONTAIN_ATTACHMENT"


    //=========  邮件详情
    //对邮件标星进行操作取消
    val CANCEL_IMPORTANT_MAIL = "CANCEL_IMPORTANT_MAIL"
    //对邮件标星进行操作标星
    val SETTING_IMPORTANT_MAIL = "SETTING_IMPORTANT_MAIL"
    //点击邮件详情的
    val CLICK_DETAILS = "CLICK_DETAILS"
    //进入邮件详情选择记住密码的
    val EMAIL_DETAIL_REMEMBER_PWD = "EMAIL_DETAIL_REMEMBER_PWD"
    //选择了回复
    val SELECT_REPLY = "SELECT_REPLY"
    //选择了全部回复
    val SELECT_REPLY_ALL = "SELECT_REPLY_ALL"
    //选择了转发
    val SELECT_FORWARD = "SELECT_FORWARD"
    //选择了删除
    val SELECT_DELETE = "SELECT_DELETE"
    //点击了区块上链的
    val CLICK_QUERY_CHAIN = "CLICK_QUERY_CHAIN"

    //=========  我的
    //点击了个人信息
    val CLICK_PERSONAL_DETAILS = "CLICK_PERSONAL_DETAILS"
    //点击了头像设置
    val CLICK_HEADURL = "CLICK_HEADURL"
    //点击了真实姓名设置
    val CLICK_REALNAME = "CLICK_REALNAME"
    //点击了公司名设置
    val CLICK_COMPANY_NAME = "CLICK_COMPANY_NAME"
    //点击了性别设置
    val CLICK_SEX = "CLICK_SEX"
    //点击了性别并选择了保密
    val CLICK_SEX_SELECT_CONFIDENTIALITY = "CLICK_SEX_SELECT_CONFIDENTIALITY"
    //点击了职业设置
    val CLICK_PROFESSION = "CLICK_PROFESSION"

    //=========  意见反馈
    //点击了意见反馈
    val CLICK_FEED_BACK = "CLICK_FEED_BACK"
    //完成了意见反馈
    val COMPLETE_FEED_BACK = "COMPLETE_FEED_BACK"
    //取消意见反馈
    val CANCLE_FEED_BACK = "CANCLE_FEED_BACK"

    //=========  邮箱管理
    //点击邮箱管理
    val CLICK_EMAIL_MANAGER = "CLICK_EMAIL_MANAGER"
    //点击了导出私钥
    val CLICK_EXPORT_PRIVATE_KEY = "CLICK_EXPORT_PRIVATE_KEY"
    //点击了添加邮箱
    val CLICK_ADD_MAIL = "CLICK_ADD_MAIL"
    //点击账号切换
    val CLICK_SWITCH_ACCOUT = "CLICK_SWITCH_ACCOUT"

    //=========  邮件安全
    //点击邮件安全
    val CLICK_EMAIL_SAFE = "CLICK_EMAIL_SAFE"
    //选择了查看邮件需要输入密码
    val SELECT_QUERY_MAIL_NEED_PWD = "SELECT_QUERY_MAIL_NEED_PWD"
    //选择了查看邮件不需要输入密码
    val SELECT_QUERY_MAIL_DONT_NEED_PWD = "SELECT_QUERY_MAIL_DONT_NEED_PWD"

    //=========  绑定手机号
    //点击绑定手机号
    val CLICK_BIND_PHOHE = "CLICK_BIND_PHOHE"
    //成功绑定了手机号
    val BIND_PHONE_COMPLETE = "BIND_PHONE_COMPLETE"
    //取消了手机号绑定
    val CANCLE_BIND_PHONE = "CANCLE_BIND_PHONE"

    //=========  点击了设置
    //关闭新邮件提醒
    val CLOSE_NEW_MAIL_PUSH = "CLOSE_NEW_MAIL_PUSH"
    //打开新邮件提醒
    val OPEN_NEW_MAIL_PUSH = "OPEN_NEW_MAIL_PUSH"
    //选择了多语言中文
    val SELECT_CHINESE = "SELECT_CHINESE"
    //选择了多语言英文
    val SELECT_ENGLISH = "SELECT_ENGLISH"
    //选择了多语言英文Follow system
    val SELECT_FOLLOW_SYSTEM = "SELECT_FOLLOW_SYSTEM"

    //=========  重设密码
    //点击了重设密码
    val CLICK_RESET_LOCAL_PWD = "CLICK_RESET_LOCAL_PWD"
    //重设密码操作完成
    val RESET_LOCAL_PWD_COMPLETE = "RESET_LOCAL_PWD_COMPLETE"
    //重设密码选择了私钥重设
    val RESET_LOCAL_PWD_SELECT_PRIVATE_KEY = "RESET_LOCAL_PWD_SELECT_PRIVATE_KEY"
    //重设密码选择了助记词重设
    val RESET_LOCAL_PWD_SELECT_MNEMONIC = "RESET_LOCAL_PWD_SELECT_MNEMONIC"

    //点击了新手指引
    val CLICK_NEW_GUIDELINES = "CLICK_NEW_GUIDELINES"

    //点击了版本更新
    val CLICK_CHECK_VERSION = "CLICK_CHECK_VERSION"

    fun sendLog(key: String, des: String) {
        val params = HashMap<String, String>()
        params.put("event_des", des)
        if (!BuildConfig.DEBUG) {
            FlurryAgent.logEvent(key, params)
        }
    }
}